﻿using System;
using System.Diagnostics;
using System.Threading;
using Mono.Collections.Generic;

namespace Mono.Cecil
{
	// Token: 0x020000C6 RID: 198
	[DebuggerDisplay("{AttributeType}")]
	public sealed class SecurityAttribute : ICustomAttribute
	{
		// Token: 0x17000234 RID: 564
		// (get) Token: 0x06000804 RID: 2052 RVA: 0x00024010 File Offset: 0x00022210
		// (set) Token: 0x06000805 RID: 2053 RVA: 0x00004E93 File Offset: 0x00003093
		public TypeReference AttributeType
		{
			get
			{
				return this.attribute_type;
			}
			set
			{
				this.attribute_type = value;
			}
		}

		// Token: 0x17000235 RID: 565
		// (get) Token: 0x06000806 RID: 2054 RVA: 0x00024028 File Offset: 0x00022228
		public bool HasFields
		{
			get
			{
				return !this.fields.IsNullOrEmpty<CustomAttributeNamedArgument>();
			}
		}

		// Token: 0x17000236 RID: 566
		// (get) Token: 0x06000807 RID: 2055 RVA: 0x00024048 File Offset: 0x00022248
		public Collection<CustomAttributeNamedArgument> Fields
		{
			get
			{
				bool flag = this.fields == null;
				if (flag)
				{
					Interlocked.CompareExchange<Collection<CustomAttributeNamedArgument>>(ref this.fields, new Collection<CustomAttributeNamedArgument>(), null);
				}
				return this.fields;
			}
		}

		// Token: 0x17000237 RID: 567
		// (get) Token: 0x06000808 RID: 2056 RVA: 0x00024080 File Offset: 0x00022280
		public bool HasProperties
		{
			get
			{
				return !this.properties.IsNullOrEmpty<CustomAttributeNamedArgument>();
			}
		}

		// Token: 0x17000238 RID: 568
		// (get) Token: 0x06000809 RID: 2057 RVA: 0x000240A0 File Offset: 0x000222A0
		public Collection<CustomAttributeNamedArgument> Properties
		{
			get
			{
				bool flag = this.properties == null;
				if (flag)
				{
					Interlocked.CompareExchange<Collection<CustomAttributeNamedArgument>>(ref this.properties, new Collection<CustomAttributeNamedArgument>(), null);
				}
				return this.properties;
			}
		}

		// Token: 0x0600080A RID: 2058 RVA: 0x00004E9D File Offset: 0x0000309D
		public SecurityAttribute(TypeReference attributeType)
		{
			this.attribute_type = attributeType;
		}

		// Token: 0x17000239 RID: 569
		// (get) Token: 0x0600080B RID: 2059 RVA: 0x00009C40 File Offset: 0x00007E40
		bool ICustomAttribute.HasConstructorArguments
		{
			get
			{
				return false;
			}
		}

		// Token: 0x1700023A RID: 570
		// (get) Token: 0x0600080C RID: 2060 RVA: 0x00003BD0 File Offset: 0x00001DD0
		Collection<CustomAttributeArgument> ICustomAttribute.ConstructorArguments
		{
			get
			{
				throw new NotSupportedException();
			}
		}

		// Token: 0x040002CD RID: 717
		private TypeReference attribute_type;

		// Token: 0x040002CE RID: 718
		internal Collection<CustomAttributeNamedArgument> fields;

		// Token: 0x040002CF RID: 719
		internal Collection<CustomAttributeNamedArgument> properties;
	}
}
